/*
 * mem_tsk.c
 *
 * Created: 2012/11/21 23:57:08
 *  Author: sazae7
 */ 
#include "include/mem_tsk.h"
#include "include/memory.h"

/* ------ Process Core ------ */
PROCESS memory_process =
{
	mem_tsk,
	NULL,
	mem_tsk_wakeup,
	NULL,
	0
};

LIST_ITEM memoryItm
=
{
	NULL,
	&memory_process
};

void mem_tsk(void *param)
{

	return;
}

BOOL mem_tsk_wakeup(void *param)
{
	// never wake after initialization
	return FALSE;
}

BOOL init_mem_tsk(BYTE SS_index)
{
	DWORD baseAddress = SS_index * 0x200000;

	InitMemory(baseAddress, 0x200000);

	UART_transmitString(UART_DBG, (BYTE *)"Initialized SRAM Manager\r\n");

	return TRUE;
}
